package com.teacher.hong.service.impl;

import com.teacher.hong.dao.SystemLogDao;
import com.teacher.hong.entity.SystemLog;
import com.teacher.hong.service.ISystemLogService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.SQLException;

@Service("systemLogService")
public class SystemLogServiceImplNA implements ISystemLogService {

    @Resource
    SystemLogDao systemLogDao;

    @Override
    public boolean save(SystemLog systemLog) {
        try {
            return systemLogDao.insert(systemLog) > 0;
        } catch (SQLException throwables) {
            throwables.printStackTrace();
            return false;
        }
    }
}
